package com.pingba.service.msg;

import com.pingba.entity.User;
import com.pingba.entity.msg.MsgSend;
import com.pingba.service.BaseService;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2015/11/2 0002.
 */
public interface MsgSendService extends BaseService<MsgSend,Long> {

    void setReplied(MsgSend msgSend);

    void setReaded(MsgSend msgSend);

    List<MsgSend> getUnhandled(long userId);

    List<MsgSend> getMysends(long userId);



    /**
     * 根据性别过滤和关键字过滤
     * @param longitude
     * @param latitude
     * @param query
     * @param curPage
     * @param orderType
     * @param gender
     * @return
     */
    List<MsgSend> nearByList(float longitude, float latitude, String query, int curPage, int orderType, int gender, long userId);

    List<MsgSend> nearByMap(double longitude, double latitude, int range, int gender, long userId);

    Map<Long,Map<String, Object>> myMsgWithApply(User me);

    /**
     * 检查是否有我新的消息的请求
     * @param me
     * @return
     */
    Map<Long,Map<String, Object>> newMyMsgWithApply(User me);

    List<MsgSend> recentSend(long userId);

    /**
     * 删除一条msgsend,
     * 会判断当前的msgSendId是否真的是该用户发送的消息
     * @param msgSendId 消息id
     * @param userId    用户id
     */
    void deleteMsgSend(long msgSendId, long userId);

//    List<MsgSend> nearByAll()
}
